﻿<% if flash[:notice] %>
    <p id="notice"><%= flash[:notice] %></p>
  <% end %>
<h1><%= t('.list') %></h1>

<table>
  <tr>
    <th>Username</th>
	<th><%= t('.name1') %></th>
	<th><%= t('.name2') %></th>
    <th><%= t('.name3') %></th>
    <th><%= t('.address') %></th>
    <th><%= t('.birthday') %></th>
    <th><%= t('.mail') %></th>
    
    
    
    <th></th>
    <th></th>
    <th></th>
  </tr>

<% @users.each do |user| %>
  <tr>
    <td><%= user.UserName %></td>
	<td><%= user.LastName %></td>
	<td><%= user.MidName %></td>
    <td><%= user.FirstName %></td>
    <td><%= user.Address %></td>
    <td><%= user.BirthDay %></td>
    <td><%= user.EmailAddress %></td>
    
    

    <td><%= link_to t('.show'), user %></td>
    <td><%= link_to t('.edit'), edit_user_path(user) %></td>
    <td><%= link_to t('.delete'), user, method: :delete, data: { confirm: 'Bạn chắc không?' } %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to t('.create'), new_user_path %>
